<?php
	$mode = isset($_GET['mode'])?$_GET['mode']: 'business';
	$type = isset($_GET['type'])?$_GET['type']: '';
	//$act = $_GET['act'];
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Blat Admin Panel</title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
<link rel="stylesheet" href="tokeninput/token-input.css" type="text/css" />
<link rel="stylesheet" href="tokeninput/token-input-facebook.css" type="text/css" />
<script language="javascript" type="text/javascript" src="js/jquery-1.10.2.min.js"></script>
<!--<script language="javascript" type="text/javascript" src="js/niceforms.js"></script>-->
<script type="text/javascript" src="js/ddaccordion.js"></script>
<script type="text/javascript" src="jquery.tokeninput.js"></script>
<script type="text/javascript">
ddaccordion.init({
	headerclass: "submenuheader", //Shared CSS class name of headers group
	contentclass: "submenu", //Shared CSS class name of contents group
	revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click", "clickgo", or "mouseover"
	mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
	collapseprev: true, //Collapse previous content (so only one open at any time)? true/false 
	defaultexpanded: [], //index of content(s) open by default [index1, index2, etc] [] denotes no content
	onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)
	animatedefault: false, //Should contents open by default be animated into view?
	persiststate: true, //persist state of opened contents within browser session?
	toggleclass: ["", ""], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
	togglehtml: ["suffix", "<img src='img/plus.gif' class='statusicon' />", "<img src='img/minus.gif' class='statusicon' />"], //Additional HTML added to the header when it's collapsed and expanded, respectively  ["position", "html1", "html2"] (see docs)
	animatespeed: "fast", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"
	oninit:function(headers, expandedindices){ //custom code to run when headers have initalized
		//do nothing
	},
	onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
		//do nothing
	}
})
</script>
<script type="text/javascript" src="js/jconfirmaction.jquery.js"></script>
<script type="text/javascript">
	
	$(document).ready(function() {
		$('.ask').jConfirmAction();		
	});
	
</script>

<script language="javascript" type="text/javascript" src="js/close-alert.js"></script>

<script language="javascript" type="text/javascript" src="js/fancyfields-1.2.min.js"></script>
<script language="javascript" type="text/javascript" src="js/jquery.fileinput.js"></script>
<script language="javascript" type="text/javascript" src="js/select-box-customize.js"></script>
<script language="javascript" type="text/javascript" src="js/checkbox-customize.js"></script>
<script language="javascript" type="text/javascript" src="js/file-customize.js"></script>
<link rel="stylesheet" type="text/css" media="all" href="css/niceforms-default.css" />

<script language="javascript" type="text/javascript" src="js/jquery-ui-1.10.3.custom.js"></script>
<script language="javascript" type="text/javascript" src="js/jquery.colorbox-min.js"></script>
<script language="javascript" type="text/javascript" src="js/colorbox-customize.js"></script>
<link rel="stylesheet" type="text/css" media="all" href="css/jquery-ui-1.10.3.custom.css" />

</head>
<body>
<div id="main_container">

	<div class="header">
    <div class="logo"><a href="member.php"><img src="img/logo.png" alt="" title="" border="0" width="150" /></a></div>
    
    <div class="right_header">Welcome Admin, <a href="http://search.insing.com" target="_blank">Visit site</a> | <a href="#" class="logout">Logout</a></div>
    <div id="clock_a"></div>
    </div>
    
    <div class="main_content">	
		
		<div class="menu">
		<?php include "includes/menu.php" ?>
		</div>                
		
		<div class="center_content">  		
			<?php if ($type == '') { ?>
				<div class="right_content" style="width:940px"> 
				<?php include "includes/dashboard.php" ?>
				</div>  
			<?php } else if (preg_match('#(business_form|bank|area|card_name|user)#i',$type, $out)) {  
					$sub_menu = $out[1];
				?>			
				<div class="left_content">    								
					<?php include "includes/$mode/submenu_$sub_menu.php" ?>					
				</div>  
				<div class="right_content">            
					<?php include "includes/$mode/$type.php" ?>
				</div>
			<?php } else { ?>
				<div class="right_content"  style="width:940px">            
					<?php include "includes/$mode/$type.php" ?>
				</div>
			<?php } ?>
		</div>   <!--end of center content -->                                                           
    
    <div class="clear"></div>    
    </div> <!--end of main content-->
	
    
    <div class="footer">    
    	<div class="left_footer">© 2013, SingTel Digital Media Pte Ltd. All Rights Reserved.</div>        
    </div>

</div>		
</body>
</html>